// 此文件用于定义首页的接口api类型规范
// 导入requset请求
import request from '@/utils/request'

/**
 * @desc 默认关键字和热门关键字
 * @returns promise
 */
export const getDefaultKeyword = () =>{
  return request.get('/xhr/search/init.json')
}

/**
 * @desc 获取实时
 * @returns promise
 */
export const getRealtime = ()=>{
  return request.get('/xhr/search/searchAutoComplete.json')
}
// export default {
//   //默认关键字和热门关键字
//   getDefaultKeyword() {
//     return request.get('/xhr/search/init.json')
//   },
//   // 获取实时数据
//   getRealtime() {
//     return request.get('/xhr/search/searchAutoComplete.json')
//   }
// }
export const getSearch = ()=>{
  return request.get(`/xhr/search/search.json?__timestamp=1630133434953&needPopWindow=true&searchWordSource=7&stillSearch=false&_stat_search=autoComplete&itemId=0&size=40&upperPrice=-1&floorPrice=-1&matchType=0&categoryId=0&descSorted=false&sortType=0&keyword=%E6%8C%89%E6%91%A9`)
}
